﻿#ifndef ROLECONTROLLER_H
#define ROLECONTROLLER_H

#include <httpcontroller.h>
using namespace stefanfrings;

class RoleController : public HttpController
{
    Q_OBJECT
public:
    explicit RoleController(QObject *parent = nullptr);
    ~RoleController();
    void route(QString path, QString method, HttpRequest &request, HttpResponse &response) override;
private:
    void getList(HttpRequest &request, HttpResponse &response);
    void saveOne(HttpRequest &request, HttpResponse &response,uint64_t id=0);
    void deleteOne(uint64_t id, HttpResponse &response);
};

#endif // ROLECONTROLLER_H
